@mixin border-radius($radius) {
	-moz-border-radius: $radius; /* FF1-3.6 */
	-webkit-border-radius: $radius; /* Saf3-4, iOS 1-3.2, Android <1.6 */
	border-radius: $radius; /* Opera 10.5, IE9, Saf5, Chrome, FF4, iOS 4, Android 2.1+ */

	/* useful if you don't want a bg color from leaking outside the border: */        
	-moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box; 
}

@mixin linear-gradient($start, $end) {
	background-color: $start;
	background-image: -webkit-gradient(linear, left top, left bottom, from($start), to($end)); /* Saf4+, Chrome */
	background-image: -webkit-linear-gradient(top, $start, $end); /* Chrome 10+, Saf5.1+, iOS 5+ */
	background-image:    -moz-linear-gradient(top, $start, $end); /* FF3.6 */
	background-image:     -ms-linear-gradient(top, $start, $end); /* IE10 */
	background-image:      -o-linear-gradient(top, $start, $end); /* Opera 11.10+ */
	background-image:         linear-gradient(top, $start, $end);
}

@mixin box-shadow($shadow) {
	-webkit-box-shadow: $shadow; /* Saf3.0+, Chrome */
	-moz-box-shadow: $shadow; /* FF3.5 - 3.6 */
	box-shadow: $shadow; /* Opera 10.5, IE9, FF4+, Chrome 10+ */
}

@mixin box-multi-shadow($shadow1, $shadow2) {
	-webkit-box-shadow: $shadow1, $shadow2; /* Saf3.0+, Chrome */
	-moz-box-shadow: $shadow1, $shadow2; /* FF3.5 - 3.6 */
	box-shadow: $shadow1, $shadow2; /* Opera 10.5, IE9, FF4+, Chrome 10+ */
}

@mixin border-image($image) {
	-webkit-border-image: $image;
	-moz-border-image: $image;
}

@mixin transform($tran) {
	-webkit-transform: $tran;
	-moz-transform: $tran;
	-ms-transform: $tran;
	-o-transform: $tran;
	transform: $tran;
}

@mixin box-curl-shadow {
	&:before,
	&:after {
		content: '';
		z-index: -1;
		position: absolute;
		left: 10px;
		bottom: 10px;
		width: 70%;
		max-width: 300px; /* avoid rotation causing ugly appearance at large container widths */
		height: 55%;
		@include box-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
		@include transform(skew(-15deg) rotate(-6deg));
	}
	&:after {
		left: auto;
		right: 10px;
		@include transform(skew(15deg) rotate(6deg));
	}
}

@mixin opacity($opacity) {
	zoom: 1;
    filter: alpha(opacity=$opacity * 100);
    opacity: $opacity;
}

@mixin nice-blue {
	@include linear-gradient(#EDEFF4, adjust-color(#EDEFF4, $lightness: -5, $saturation: -5));
	border:1px solid adjust-color(#E5EAF1, $lightness:-10) !important;
	@include box-shadow(1px 1px 0px #ffffff inset);
}

@mixin nice-shaded-blue {
	@include linear-gradient(#EDEFF4, #FFFFFF);
	border-top:1px solid adjust-color(#E5EAF1, $lightness:-10);
	@include box-shadow(1px 1px 0px #ffffff inset);
}

@mixin nice-dark-blue {
	background-color: transparent;
	@include linear-gradient(#6885b6, #485c96);
	border:1px solid #223e7b;
	@include box-shadow(1px 1px 0px rgba(255, 255, 255, 0.3) inset);
}

@mixin menu-item {
	@include glossy-blue;
	text-shadow: 0 -1px 0 #000000;
}

@mixin jewel-menu-item {
	@include nice-dark-blue;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
	border-left:none;
	border-right:none;
}

@mixin nice-inset {
	border-type: solid;
	border-color: adjust-color(#3B5998, $lightness: 10) #3B5998 #3B5998 adjust-color(#3B5998, $lightness: 10);
	background-color:#D8DFEA;
	@include box-multi-shadow(1px 1px 1px #6E86B9 inset, 0 1px 0 #FFFFFF);
}

@mixin black-text-shadow {
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}

@mixin white-text-shadow {
	text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

@mixin type-head {
	@include box-multi-shadow(1px 1px 1px #E5EAF1 inset, 0 1px 0 #ffffff);
	@include border-radius(2px);
}

@mixin type-head-light {
	@include box-multi-shadow(1px 1px 1px #E5EAF1 inset, 0 1px 0 rgba(255, 255, 255, 0.3));
	@include border-radius(2px);
}

@mixin blue-button {
	@include linear-gradient(#4263ba, #1e2d66);
	@include box-multi-shadow(0 1px 3px rbga(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.6) inset);
	text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6);
	border:1px solid #1e2d66;
}

@mixin no-box-shadow {
	@include box-shadow(0 0 0 transparent);
}

@mixin glossy-button($base-color) {
	background: -moz-linear-gradient(top, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 49%, rgba(255,255,255,0) 51%, rgba(255,255,255,0.15) 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.2)), color-stop(49%,rgba(255,255,255,0.1)), color-stop(51%,rgba(255,255,255,0)), color-stop(100%,rgba(255,255,255,0.15))); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top, rgba(255,255,255,0.2) 0%,rgba(255,255,255,0.1) 49%,rgba(255,255,255,0) 51%,rgba(255,255,255,0.15) 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top, rgba(255,255,255,0.2) 0%,rgba(255,255,255,0.1) 49%,rgba(255,255,255,0) 51%,rgba(255,255,255,0.15) 100%); /* Opera11.10+ */
	background: -ms-linear-gradient(top, rgba(255,255,255,0.2) 0%,rgba(255,255,255,0.1) 49%,rgba(255,255,255,0) 51%,rgba(255,255,255,0.15) 100%); /* IE10+ */
	background: linear-gradient(top, rgba(255,255,255,0.2) 0%,rgba(255,255,255,0.1) 49%,rgba(255,255,255,0) 51%,rgba(255,255,255,0.15) 100%); /* W3C */
	background-color:$base-color !important;
	border: 1px solid adjust-color($base-color, $lightness: -10, $saturation: -5) !important;
	@include box-multi-shadow(0 1px 3px rgba(0, 0, 0, 0.6), 0 0 3px rgba(255, 255, 255, 0.4) inset);
}

@mixin glossy-blue-shadowed {
	@include glossy-button(#304890);
	@include box-multi-shadow(0px 1px 0px #FFFFFF, 0px 0px 3px rgba(255, 255, 255, 0.5) inset);
}

@mixin glossy-blue {
	@include glossy-button(#304890);
}

@mixin glossy-green {
	@include glossy-button(#afcf48);
}

@mixin glossy-gray {
	@include glossy-button(#d8d8d8);
}

@mixin glossy-black {
	@include glossy-button(#222222);
}

@mixin glossy-light-blue {
	@include glossy-button(#d8d8f0);
}

@mixin transition-double-fade($shadow) {
	@include box-shadow(0 0 0);
	-webkit-transition: box-shadow;
	-webkit-transition-timing-function: ease-out;
	-webkit-transition-duration: 200ms;
	&:hover {
		@include box-multi-shadow($shadow, $shadow);
		-webkit-transition: box-shadow;
		-webkit-transition-timing-function: ease-out;
		-webkit-transition-duration: 200ms;
	}
}

@mixin transition-fade($shadow) {
	@include box-shadow(0 0 0);
	-webkit-transition: box-shadow;
	-webkit-transition-timing-function: ease-out;
	-webkit-transition-duration: 200ms;
	&:hover {
		@include box-shadow($shadow);
		-webkit-transition: box-shadow;
		-webkit-transition-timing-function: ease-out;
		-webkit-transition-duration: 200ms;
	}
}

@mixin transition-fade-blue {
	@include transition-fade(0 0 6px #ced5e5);
}

@mixin transition-fade-inset {
	@include transition-fade(0 0 6px #333333 inset);
}

@mixin text-fade {
	text-shadow: 0 0 0;
	-webkit-transition: text-shadow;
	-webkit-transition-timing-function: ease-out;
	-webkit-transition-duration: 200ms;
	&:hover {
		text-shadow: 0 0 6px #ced5e5, 0 0 6px #ced5e5;
		-webkit-transition: box-shadow;
		-webkit-transition-timing-function: ease-out;
		-webkit-transition-duration: 200ms;
	}
}

@mixin transparent-gloss {
	background: -moz-linear-gradient(top, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.2) 49%, rgba(255,255,255,0) 50%, rgba(255,255,255,0) 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.3)), color-stop(49%,rgba(255,255,255,0.2)), color-stop(50%,rgba(255,255,255,0)), color-stop(100%,rgba(255,255,255,0))); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0.2) 49%,rgba(255,255,255,0) 50%,rgba(255,255,255,0) 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0.2) 49%,rgba(255,255,255,0) 50%,rgba(255,255,255,0) 100%); /* Opera11.10+ */
	background: -ms-linear-gradient(top, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0.2) 49%,rgba(255,255,255,0) 50%,rgba(255,255,255,0) 100%); /* IE10+ */
	background: linear-gradient(top, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0.2) 49%,rgba(255,255,255,0) 50%,rgba(255,255,255,0) 100%); /* W3C */
}

@mixin ios-notification {
	border:2px solid #FFFFFF;
	@include border-radius(10px);
	@include transparent-gloss;
	background-color: #F03D25;
	color:#FFFFFF;
	text-shadow: 0 -1px 0 #000000;
}

@mixin ios-blue-notification {
	@include ios-notification;
	background-color:#D8DFEA;
	color: adjust-color(#D8DFEA, $lightness: -15);
}